package com.turtle3d.turtle;

import java.util.ArrayList;
import java.util.Collection;

import javax.vecmath.Matrix4f;

/**
 * Very basic turtle functionality.
 * 
 * @author Marek Paterczyk <marek.paterczyk@gmail.com>
 *
 */
public class Turtle3DCore {
	
	/**
	 * Turtle's transformation matrix.
	 */
	private Matrix4f transformMatrix = new Matrix4f();
		
	public Turtle3DCore(){
		transformMatrix.setIdentity();	
	}
	
	/**
	 * Change turtle's position/orientation/scale
	 * @param matrix Transformation matrix
	 */
	public void transform(Matrix4f matrix){
		transformMatrix.mul(matrix);		
	}

	/**
	 * 
	 * @return Turtle's transformation matrix
	 */
	public Matrix4f getTransformMatrix() {
		return new Matrix4f(transformMatrix);
	}

	/**
	 * 
	 * @param transformMatrix Turtle's transformation matrix
	 */
	public void setTransformMatrix(Matrix4f transformMatrix) {		
		this.transformMatrix = transformMatrix;
	}		
		
}
